package com.zhiyun.vo;

import com.zhiyun.domain.Examination;
import com.zhiyun.domain.Response;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * @author zc
 * @Date 2025/5/6 下午9:07
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ExaminationRecordVo implements Serializable {
    @Serial
    private static final long serialVersionUID = 8095442218101815567L;
//    哪次考试
    private Examination examination;
//    作答vo的集合
    private List<ExaminationResponseVo> responseVos;
    public int getTotalScore(){
        int totalScore = 0;
        for (ExaminationResponseVo response : responseVos) {
            totalScore += response.getScore();
        }
        return totalScore;
    }
}
